package cn.imvc.app.repositories;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import cn.imvc.app.entities.Favorites;

public interface FavoritesRepository extends JpaRepository<Favorites, Integer>{
	
	Page<Favorites> findByMemberIdOrderByIdDesc(Integer memberId,Pageable pageable);
	/**
	 * 根据用户id和skuid 查询favorite对象
	 * @param id
	 * @param skuId
	 * @return
	 */
	Favorites findByMemberIdAndSkuId(int id, Integer skuId);


}
